import requests
# 验证码图片地址
url = 'https://so.gushiwen.cn/RandCode.ashx'
# 发起网络请求
res = requests.get(url)
# print(res.content)
with open('yzm.jpg', 'wb') as f:
    f.write(res.content)